package com.qsq.newsmanager.dto;

import com.qsq.newsmanager.enums.InsertStatEnum;

/**
 * Created by lining on 2017/3/28.
 */
public class InsertExcution {

    // 新闻ID
    private long newsId;
    // 插入状态
    private int state;
    //插入状态描述
    private String stateInfo;


    public InsertExcution() {

    }

    //插入成功
    public InsertExcution(long newsId, InsertStatEnum statEnum) {
        this.newsId = newsId;
        this.state = statEnum.getState();
        this.stateInfo = statEnum.getStateInfo();
    }

    //插入失败
    public InsertExcution(InsertStatEnum statEnum) {
        this.state = statEnum.getState();
        this.stateInfo = statEnum.getStateInfo();
    }

    public long getNewsId() {
        return newsId;
    }

    public void setNewsId(long newsId) {
        this.newsId = newsId;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }
}
